﻿<%@ Page Title="" Language="C#" MasterPageFile="~/AdminCP/Layouts/Admin.Master" AutoEventWireup="true" CodeBehind="AdsEdit.aspx.cs" Inherits="Thuoc24h.AdminCP.Pages.AdsEdit" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" runat="server">
    <script type="text/javascript">
        function OpenFileExplorerDialog() {
            var wnd = $find("<%= ExplorerWindow.ClientID %>");
            wnd.show();
        }
        function OnFileSelected(fileSelected) {
            var textbox = $find("<%= txtFileName.ClientID %>");
                    textbox.set_value(fileSelected);
                }
    </script>
    <Telerik:RadWindow runat="server" Width="800px" Height="450px" VisibleStatusbar="false"
        ShowContentDuringLoad="false" NavigateUrl="/AdminCP/Pages/Explorer.aspx" ID="ExplorerWindow"
        Modal="true" Behaviors="Close,Move">
    </Telerik:RadWindow>
    <Telerik:RadPanelBar runat="server" ID="RadPanelBar1" Width="100%" Height="100%"
        ExpandMode="FullExpandedItem">
        <Items>
            <Telerik:RadPanelItem Text="Thêm / sửa quảng cáo" Expanded="True">
                <ContentTemplate>
                     <div class="item">
                        <label>Loại quảng cáo:</label><Telerik:RadComboBox runat="server" ID="ccAdsype" CausesValidation="False" Width="350px" AutoPostBack="True" OnSelectedIndexChanged="ccAdsype_OnSelectedIndexChanged">

                            <Items>
                                <Telerik:RadComboBoxItem runat="server" Text="Ảnh" Value="1" />
                                <Telerik:RadComboBoxItem runat="server" Text="Flash" Value="2" />
                            </Items>
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </Telerik:RadComboBox>

                    </div>
                    <div class="item">
                        <label>Vị trí:</label><Telerik:RadComboBox runat="server" ID="cbbPosition" Width="350px" >
                            <Items>
                               
                                <Telerik:RadComboBoxItem runat="server" Text="Banner" Value="1" />
                                 <Telerik:RadComboBoxItem runat="server" Text="Phải" Value="2" />
                            </Items>
                            <CollapseAnimation Duration="200" Type="OutQuint" />
                        </Telerik:RadComboBox>

                    </div>
                    <div class="item">
                        <label>Liên kết:</label><Telerik:RadTextBox runat="server" ID="txtLink" Width="350px" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" Display="Dynamic" ForeColor="red" ControlToValidate="txtLink" runat="server" ErrorMessage="*" />
                         <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Liên kết không đúng định dạng" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?" Display="Dynamic" ForeColor="red" ControlToValidate="txtLink"></asp:RegularExpressionValidator>
                 
                           </div>
                    
                    <asp:Panel runat="server" ID="pnlImage">
                    <div class="item">
                        <label>Ảnh đại diện:</label><Telerik:RadTextBox runat="server" ID="txtFileName" Width="350px" /><span style="display: inline-block; cursor: pointer; font-size: 12px;" id="btnUpload" onclick="OpenFileExplorerDialog(); return false;"><strong>Chọn ảnh...</strong></span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" Display="Dynamic" ForeColor="red" ControlToValidate="txtFileName" runat="server" ErrorMessage="*" />
                    </div>
                    </asp:Panel>
                    <asp:Panel runat="server" ID="pnlEmbed">
                    <div class="item">
                        <label>Mã nhúng:</label><Telerik:RadTextBox runat="server" ID="txtEmbedCode" Width="350px" Height="120px" TextMode="MultiLine" />
                        <asp:RequiredFieldValidator ID="txtEmbedCodsse" Display="Dynamic" ForeColor="red" ControlToValidate="txtEmbedCode" runat="server" ErrorMessage="*" />
                    </div>
                        </asp:Panel>
                    <div class="item">
                        <label>Thứ tự:</label><Telerik:RadNumericTextBox ID="radNumberOrd" runat="server" MinValue="0" Value="1" Width="218px" CssClass="right" ShowSpinButtons="True">
                            <NumberFormat DecimalDigits="0" />
                        </Telerik:RadNumericTextBox>
                    </div>

                    <div class="item">
                        <label></label>
                        <Telerik:RadButton runat="server" ID="btnSave" OnClick="btnSave_OnClick"></Telerik:RadButton>
                        <Telerik:RadButton ID="RadButton1" runat="server" Text="Làm lại" OnClick="OnClick" CausesValidation="False"></Telerik:RadButton>
                    </div>
                </ContentTemplate>
            </Telerik:RadPanelItem>
        </Items>
    </Telerik:RadPanelBar>

</asp:Content>
